.class public Lrexsee/network/RexseeBluetooth;
.super Ljava/lang/Object;
.source "RexseeBluetooth.java"

# interfaces
.implements Lrexsee/core/browser/clazz/JavascriptInterface;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lrexsee/network/RexseeBluetooth$BluetoothConnection;,
        Lrexsee/network/RexseeBluetooth$ListenerForConnection;
    }
.end annotation


# static fields
.field public static final CONNECT_STATE_CONNECTED:I = 0x2

.field public static final CONNECT_STATE_CONNECTING:I = 0x1

.field public static final CONNECT_STATE_NONE:I = 0x0

.field public static final ERROR_DEVICE_ERROR:Ljava/lang/String; = "Remote device doesn\'t exist."

.field public static final ERROR_DISABLED:Ljava/lang/String; = "Bluetooth is disabled."

.field public static final ERROR_INVALIDE_ADDRESS:Ljava/lang/String; = "Bluetooth address is invalid:"

.field public static final ERROR_UNSUPPORTED:Ljava/lang/String; = "Bluetooth isn\'t supported on this device."

.field public static final EVENT_ACTION_ACL_CONNECTED:Ljava/lang/String; = "onBluetoothDeviceACLConnected"

.field public static final EVENT_ACTION_ACL_DISCONNECTED:Ljava/lang/String; = "onBluetoothDeviceACLDisconnected"

.field public static final EVENT_ACTION_ACL_DISCONNECT_REQUESTED:Ljava/lang/String; = "onBluetoothDeviceACLDisconnectRequested"

.field public static final EVENT_ACTION_BOND_STATE_CHANGED:Ljava/lang/String; = "onBluetoothDeviceBondStateChanged"

.field public static final EVENT_ACTION_CLASS_CHANGED:Ljava/lang/String; = "onBluetoothDeviceClassChanged"

.field public static final EVENT_ACTION_DISCOVERY_FINISHED:Ljava/lang/String; = "onBluetoothDiscoveringFinished"

.field public static final EVENT_ACTION_DISCOVERY_STARTED:Ljava/lang/String; = "onBluetoothDiscoveringStarted"

.field public static final EVENT_ACTION_FOUND:Ljava/lang/String; = "onBluetoothDeviceFound"

.field public static final EVENT_ACTION_LOCAL_NAME_CHANGED:Ljava/lang/String; = "onBluetoothLocalNameChanged"

.field public static final EVENT_ACTION_NAME_CHANGED:Ljava/lang/String; = "onBluetoothDeviceNameChanged"

.field public static final EVENT_ACTION_SCAN_MODE_CHANGED:Ljava/lang/String; = "onBluetoothScanModeChanged"

.field public static final EVENT_ACTION_STATE_CHANGED:Ljava/lang/String; = "onBluetoothStateChanged"

.field public static final EVENT_CONNECTION_LOST:Ljava/lang/String; = "onBluetoothConnectionLost"

.field public static final EVENT_CONNECTION_REQUEST:Ljava/lang/String; = "onBluetoothReceivedConnectRequest"

.field public static final EVENT_CONNECT_FAILED:Ljava/lang/String; = "onBluetoothDeviceConnectFailed"

.field public static final EVENT_CONNECT_STATE_CHANGED:Ljava/lang/String; = "onBluetoothDeviceConnectStateChanged"

.field public static final EVENT_DATA_READ:Ljava/lang/String; = "onBluetoothDataRead"

.field public static final EVENT_DATA_WRITE:Ljava/lang/String; = "onBluetoothDataWrite"

.field public static final EVENT_ONBLUETTOOTHENABLEFAILED:Ljava/lang/String; = "onBluetoothEnableFailed"

.field public static final EVENT_ONBLUETTOOTHENABLESUCCESSED:Ljava/lang/String; = "onBluetoothEnableSuccessed"

.field public static final EVENT_ONBLUETTOOTHSETDISCOVERABLEFAILED:Ljava/lang/String; = "onBluetoothSetDiscoverableFailed"

.field public static final EVENT_ONBLUETTOOTHSETDISCOVERABLESUCCESSED:Ljava/lang/String; = "onBluetoothSetDiscoverableSuccessed"

.field private static final INCOMING_CONNECTION:Ljava/lang/String; = "BluetoothIncomingConnection"

.field public static final INTERFACE_NAME:Ljava/lang/String; = "Bluetooth"

.field private static final UUID_SERIAL_PORT:Ljava/util/UUID;


# instance fields
.field private final EVENT_ACTION_ACL_CONNECTED_Receiver:Landroid/content/BroadcastReceiver;

.field private final EVENT_ACTION_ACL_DISCONNECTED_Receiver:Landroid/content/BroadcastReceiver;

.field private final EVENT_ACTION_ACL_DISCONNECT_REQUESTED_Receiver:Landroid/content/BroadcastReceiver;

.field private final EVENT_ACTION_BOND_STATE_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

.field private final EVENT_ACTION_CLASS_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

.field private final EVENT_ACTION_DISCOVERY_FINISHED_Receiver:Landroid/content/BroadcastReceiver;

.field private final EVENT_ACTION_DISCOVERY_STARTED_Receiver:Landroid/content/BroadcastReceiver;

.field private final EVENT_ACTION_FOUND_Receiver:Landroid/content/BroadcastReceiver;

.field private final EVENT_ACTION_LOCAL_NAME_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

.field private final EVENT_ACTION_NAME_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

.field private final EVENT_ACTION_SCAN_MODE_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

.field private final EVENT_ACTION_STATE_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

.field private final mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

.field private final mBrowser:Lrexsee/core/browser/Browser;

.field private mConnectState:I

.field private final mContext:Landroid/content/Context;

.field private mCurrentRemoteDevice:Landroid/bluetooth/BluetoothDevice;

.field private final mDeviceList:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Landroid/bluetooth/BluetoothDevice;",
            ">;"
        }
    .end annotation
.end field

.field private mIsListeningToBroadcast:Z

.field private mListenerForConnection:Lrexsee/network/RexseeBluetooth$ListenerForConnection;

.field private mPreviousConnectState:I

.field private mServerSocket:Landroid/bluetooth/BluetoothServerSocket;

.field private mSocket:Landroid/bluetooth/BluetoothSocket;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 192
    const-string v0, "00001101-0000-1000-8000-00805F9B34FB"

    invoke-static {v0}, Ljava/util/UUID;->fromString(Ljava/lang/String;)Ljava/util/UUID;

    move-result-object v0

    sput-object v0, Lrexsee/network/RexseeBluetooth;->UUID_SERIAL_PORT:Ljava/util/UUID;

    .line 29
    return-void
.end method

.method public constructor <init>(Lrexsee/core/browser/Browser;)V
    .locals 3
    .param p1, "browser"    # Lrexsee/core/browser/Browser;

    .prologue
    const/4 v2, 0x0

    const/4 v1, 0x0

    .line 343
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 230
    new-instance v0, Lrexsee/network/RexseeBluetooth$1;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeBluetooth$1;-><init>(Lrexsee/network/RexseeBluetooth;)V

    iput-object v0, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_DISCOVERY_STARTED_Receiver:Landroid/content/BroadcastReceiver;

    .line 237
    new-instance v0, Lrexsee/network/RexseeBluetooth$2;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeBluetooth$2;-><init>(Lrexsee/network/RexseeBluetooth;)V

    iput-object v0, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_DISCOVERY_FINISHED_Receiver:Landroid/content/BroadcastReceiver;

    .line 243
    new-instance v0, Lrexsee/network/RexseeBluetooth$3;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeBluetooth$3;-><init>(Lrexsee/network/RexseeBluetooth;)V

    iput-object v0, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_LOCAL_NAME_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

    .line 249
    new-instance v0, Lrexsee/network/RexseeBluetooth$4;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeBluetooth$4;-><init>(Lrexsee/network/RexseeBluetooth;)V

    iput-object v0, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_SCAN_MODE_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

    .line 257
    new-instance v0, Lrexsee/network/RexseeBluetooth$5;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeBluetooth$5;-><init>(Lrexsee/network/RexseeBluetooth;)V

    iput-object v0, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_STATE_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

    .line 275
    new-instance v0, Lrexsee/network/RexseeBluetooth$6;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeBluetooth$6;-><init>(Lrexsee/network/RexseeBluetooth;)V

    iput-object v0, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_FOUND_Receiver:Landroid/content/BroadcastReceiver;

    .line 283
    new-instance v0, Lrexsee/network/RexseeBluetooth$7;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeBluetooth$7;-><init>(Lrexsee/network/RexseeBluetooth;)V

    iput-object v0, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_ACL_CONNECTED_Receiver:Landroid/content/BroadcastReceiver;

    .line 290
    new-instance v0, Lrexsee/network/RexseeBluetooth$8;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeBluetooth$8;-><init>(Lrexsee/network/RexseeBluetooth;)V

    iput-object v0, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_ACL_DISCONNECTED_Receiver:Landroid/content/BroadcastReceiver;

    .line 297
    new-instance v0, Lrexsee/network/RexseeBluetooth$9;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeBluetooth$9;-><init>(Lrexsee/network/RexseeBluetooth;)V

    iput-object v0, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_ACL_DISCONNECT_REQUESTED_Receiver:Landroid/content/BroadcastReceiver;

    .line 304
    new-instance v0, Lrexsee/network/RexseeBluetooth$10;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeBluetooth$10;-><init>(Lrexsee/network/RexseeBluetooth;)V

    iput-object v0, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_BOND_STATE_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

    .line 313
    new-instance v0, Lrexsee/network/RexseeBluetooth$11;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeBluetooth$11;-><init>(Lrexsee/network/RexseeBluetooth;)V

    iput-object v0, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_CLASS_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

    .line 320
    new-instance v0, Lrexsee/network/RexseeBluetooth$12;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeBluetooth$12;-><init>(Lrexsee/network/RexseeBluetooth;)V

    iput-object v0, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_NAME_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

    .line 331
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lrexsee/network/RexseeBluetooth;->mDeviceList:Ljava/util/ArrayList;

    .line 341
    iput-boolean v2, p0, Lrexsee/network/RexseeBluetooth;->mIsListeningToBroadcast:Z

    .line 345
    invoke-virtual {p1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v0

    iput-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    .line 346
    iput-object p1, p0, Lrexsee/network/RexseeBluetooth;->mBrowser:Lrexsee/core/browser/Browser;

    .line 347
    invoke-static {}, Landroid/bluetooth/BluetoothAdapter;->getDefaultAdapter()Landroid/bluetooth/BluetoothAdapter;

    move-result-object v0

    iput-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    .line 348
    iput v2, p0, Lrexsee/network/RexseeBluetooth;->mConnectState:I

    .line 349
    iput v2, p0, Lrexsee/network/RexseeBluetooth;->mPreviousConnectState:I

    .line 350
    iput-object v1, p0, Lrexsee/network/RexseeBluetooth;->mCurrentRemoteDevice:Landroid/bluetooth/BluetoothDevice;

    .line 352
    iput-object v1, p0, Lrexsee/network/RexseeBluetooth;->mListenerForConnection:Lrexsee/network/RexseeBluetooth$ListenerForConnection;

    .line 353
    iput-object v1, p0, Lrexsee/network/RexseeBluetooth;->mServerSocket:Landroid/bluetooth/BluetoothServerSocket;

    .line 354
    iput-object v1, p0, Lrexsee/network/RexseeBluetooth;->mSocket:Landroid/bluetooth/BluetoothSocket;

    .line 356
    iget-object v0, p1, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onBluetoothEnableSuccessed"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 357
    iget-object v0, p1, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onBluetoothEnableFailed"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 358
    iget-object v0, p1, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onBluetoothSetDiscoverableSuccessed"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 359
    iget-object v0, p1, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onBluetoothSetDiscoverableFailed"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 361
    iget-object v0, p1, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onBluetoothDiscoveringStarted"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 362
    iget-object v0, p1, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onBluetoothDiscoveringFinished"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 363
    iget-object v0, p1, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onBluetoothLocalNameChanged"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 364
    iget-object v0, p1, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onBluetoothScanModeChanged"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 365
    iget-object v0, p1, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onBluetoothStateChanged"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 367
    iget-object v0, p1, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onBluetoothDeviceFound"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 368
    iget-object v0, p1, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onBluetoothDeviceACLConnected"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 369
    iget-object v0, p1, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onBluetoothDeviceACLDisconnected"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 370
    iget-object v0, p1, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onBluetoothDeviceACLDisconnectRequested"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 371
    iget-object v0, p1, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onBluetoothDeviceBondStateChanged"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 372
    iget-object v0, p1, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onBluetoothDeviceClassChanged"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 373
    iget-object v0, p1, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onBluetoothDeviceNameChanged"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 375
    iget-object v0, p1, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onBluetoothDeviceConnectStateChanged"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 376
    iget-object v0, p1, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onBluetoothDeviceConnectFailed"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 377
    iget-object v0, p1, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onBluetoothReceivedConnectRequest"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 378
    iget-object v0, p1, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onBluetoothConnectionLost"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 379
    iget-object v0, p1, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onBluetoothDataRead"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 380
    iget-object v0, p1, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onBluetoothDataWrite"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 382
    return-void
.end method

.method static synthetic access$0(Lrexsee/network/RexseeBluetooth;)Ljava/util/ArrayList;
    .locals 1

    .prologue
    .line 331
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mDeviceList:Ljava/util/ArrayList;

    return-object v0
.end method

.method static synthetic access$1(Lrexsee/network/RexseeBluetooth;)Lrexsee/core/browser/Browser;
    .locals 1

    .prologue
    .line 329
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBrowser:Lrexsee/core/browser/Browser;

    return-object v0
.end method

.method static synthetic access$10(Lrexsee/network/RexseeBluetooth;I)V
    .locals 0

    .prologue
    .line 159
    invoke-direct {p0, p1}, Lrexsee/network/RexseeBluetooth;->setConnectState_(I)V

    return-void
.end method

.method static synthetic access$11(Lrexsee/network/RexseeBluetooth;)Landroid/bluetooth/BluetoothAdapter;
    .locals 1

    .prologue
    .line 330
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    return-object v0
.end method

.method static synthetic access$12(Lrexsee/network/RexseeBluetooth;)Landroid/bluetooth/BluetoothDevice;
    .locals 1

    .prologue
    .line 333
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mCurrentRemoteDevice:Landroid/bluetooth/BluetoothDevice;

    return-object v0
.end method

.method static synthetic access$13()Ljava/util/UUID;
    .locals 1

    .prologue
    .line 192
    sget-object v0, Lrexsee/network/RexseeBluetooth;->UUID_SERIAL_PORT:Ljava/util/UUID;

    return-object v0
.end method

.method static synthetic access$2(Lrexsee/network/RexseeBluetooth;I)Ljava/lang/String;
    .locals 1

    .prologue
    .line 137
    invoke-direct {p0, p1}, Lrexsee/network/RexseeBluetooth;->getScanMode_(I)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$3(Lrexsee/network/RexseeBluetooth;I)Ljava/lang/String;
    .locals 1

    .prologue
    .line 112
    invoke-direct {p0, p1}, Lrexsee/network/RexseeBluetooth;->getState_(I)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$4(Lrexsee/network/RexseeBluetooth;I)Ljava/lang/String;
    .locals 1

    .prologue
    .line 102
    invoke-direct {p0, p1}, Lrexsee/network/RexseeBluetooth;->getBondState_(I)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$5(Lrexsee/network/RexseeBluetooth;)I
    .locals 1

    .prologue
    .line 334
    iget v0, p0, Lrexsee/network/RexseeBluetooth;->mConnectState:I

    return v0
.end method

.method static synthetic access$6(Lrexsee/network/RexseeBluetooth;)Landroid/bluetooth/BluetoothServerSocket;
    .locals 1

    .prologue
    .line 338
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mServerSocket:Landroid/bluetooth/BluetoothServerSocket;

    return-object v0
.end method

.method static synthetic access$7(Lrexsee/network/RexseeBluetooth;Landroid/bluetooth/BluetoothSocket;)V
    .locals 0

    .prologue
    .line 339
    iput-object p1, p0, Lrexsee/network/RexseeBluetooth;->mSocket:Landroid/bluetooth/BluetoothSocket;

    return-void
.end method

.method static synthetic access$8(Lrexsee/network/RexseeBluetooth;)Landroid/bluetooth/BluetoothSocket;
    .locals 1

    .prologue
    .line 339
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mSocket:Landroid/bluetooth/BluetoothSocket;

    return-object v0
.end method

.method static synthetic access$9(Lrexsee/network/RexseeBluetooth;Landroid/bluetooth/BluetoothDevice;)V
    .locals 0

    .prologue
    .line 333
    iput-object p1, p0, Lrexsee/network/RexseeBluetooth;->mCurrentRemoteDevice:Landroid/bluetooth/BluetoothDevice;

    return-void
.end method

.method private convertPinToBytes(Ljava/lang/String;)[B
    .locals 5
    .param p1, "pin"    # Ljava/lang/String;

    .prologue
    const/4 v4, 0x0

    .line 148
    if-nez p1, :cond_0

    move-object v2, v4

    .line 156
    :goto_0
    return-object v2

    .line 151
    :cond_0
    :try_start_0
    const-string v2, "UTF8"

    invoke-virtual {p1, v2}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v0

    .line 155
    .local v0, "pinBytes":[B
    array-length v2, v0

    if-lez v2, :cond_1

    array-length v2, v0

    const/16 v3, 0x10

    if-le v2, v3, :cond_2

    :cond_1
    move-object v2, v4

    goto :goto_0

    .line 152
    .end local v0    # "pinBytes":[B
    :catch_0
    move-exception v2

    move-object v1, v2

    .local v1, "uee":Ljava/lang/Exception;
    move-object v2, v4

    .line 153
    goto :goto_0

    .end local v1    # "uee":Ljava/lang/Exception;
    .restart local v0    # "pinBytes":[B
    :cond_2
    move-object v2, v0

    .line 156
    goto :goto_0
.end method

.method private error(Ljava/lang/String;)V
    .locals 4
    .param p1, "msg"    # Ljava/lang/String;

    .prologue
    .line 206
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/network/RexseeBluetooth;->getInterfaceName()Ljava/lang/String;

    move-result-object v1

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "Bluetooth Error: "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    .line 207
    return-void
.end method

.method private getBondState_(I)Ljava/lang/String;
    .locals 1
    .param p1, "iState"    # I

    .prologue
    .line 103
    packed-switch p1, :pswitch_data_0

    .line 109
    const-string v0, "none"

    :goto_0
    return-object v0

    .line 105
    :pswitch_0
    const-string v0, "bonded"

    goto :goto_0

    .line 107
    :pswitch_1
    const-string v0, "bonding"

    goto :goto_0

    .line 103
    :pswitch_data_0
    .packed-switch 0xb
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

.method private getConnectState_(I)Ljava/lang/String;
    .locals 1
    .param p1, "iState"    # I

    .prologue
    .line 127
    packed-switch p1, :pswitch_data_0

    .line 133
    const-string v0, "none"

    :goto_0
    return-object v0

    .line 129
    :pswitch_0
    const-string v0, "connected"

    goto :goto_0

    .line 131
    :pswitch_1
    const-string v0, "connecting"

    goto :goto_0

    .line 127
    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

.method private getDeviceClass_(Landroid/bluetooth/BluetoothDevice;)Ljava/lang/String;
    .locals 6
    .param p1, "device"    # Landroid/bluetooth/BluetoothDevice;

    .prologue
    const/4 v5, 0x0

    .line 63
    invoke-virtual {p1}, Landroid/bluetooth/BluetoothDevice;->getBluetoothClass()Landroid/bluetooth/BluetoothClass;

    move-result-object v3

    invoke-virtual {v3}, Landroid/bluetooth/BluetoothClass;->getDeviceClass()I

    move-result v0

    .line 64
    .local v0, "c":I
    const-class v3, Landroid/bluetooth/BluetoothClass$Device;

    invoke-virtual {v3}, Ljava/lang/Class;->getDeclaredFields()[Ljava/lang/reflect/Field;

    move-result-object v1

    .line 65
    .local v1, "fields":[Ljava/lang/reflect/Field;
    const/4 v2, 0x0

    .local v2, "i":I
    :goto_0
    array-length v3, v1

    if-lt v2, v3, :cond_0

    move-object v3, v5

    .line 71
    :goto_1
    return-object v3

    .line 67
    :cond_0
    :try_start_0
    aget-object v3, v1, v2

    const/4 v4, 0x0

    invoke-virtual {v3, v4}, Ljava/lang/reflect/Field;->getInt(Ljava/lang/Object;)I

    move-result v3

    if-ne v3, v0, :cond_1

    aget-object v3, v1, v2

    invoke-virtual {v3}, Ljava/lang/reflect/Field;->getName()Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v3

    goto :goto_1

    .line 68
    :catch_0
    move-exception v3

    .line 65
    :cond_1
    add-int/lit8 v2, v2, 0x1

    goto :goto_0
.end method

.method private getJsonInfoByDevice_(Landroid/bluetooth/BluetoothDevice;)Ljava/lang/String;
    .locals 4
    .param p1, "device"    # Landroid/bluetooth/BluetoothDevice;

    .prologue
    const-string v3, "\""

    .line 47
    if-nez p1, :cond_0

    .line 48
    const-string v1, "Remote device doesn\'t exist."

    invoke-direct {p0, v1}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 49
    const-string v1, "{}"

    .line 60
    :goto_0
    return-object v1

    .line 51
    :cond_0
    const-string v0, ""

    .line 52
    .local v0, "rtn":Ljava/lang/String;
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "{"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 53
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "\"address\":\""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p1}, Landroid/bluetooth/BluetoothDevice;->getAddress()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "\""

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 54
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, ",\"name\":\""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p1}, Landroid/bluetooth/BluetoothDevice;->getName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "\""

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 55
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, ",\"state\":\""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p1}, Landroid/bluetooth/BluetoothDevice;->getBondState()I

    move-result v2

    invoke-direct {p0, v2}, Lrexsee/network/RexseeBluetooth;->getBondState_(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "\""

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 56
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, ",\"class\":\""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-direct {p0, p1}, Lrexsee/network/RexseeBluetooth;->getDeviceClass_(Landroid/bluetooth/BluetoothDevice;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "\""

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 57
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, ",\"major\":\""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-direct {p0, p1}, Lrexsee/network/RexseeBluetooth;->getMajorDeviceClass_(Landroid/bluetooth/BluetoothDevice;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "\""

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 58
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, ",\"services\":"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-direct {p0, p1}, Lrexsee/network/RexseeBluetooth;->getServiceClasses_(Landroid/bluetooth/BluetoothDevice;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 59
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "}"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    move-object v1, v0

    .line 60
    goto/16 :goto_0
.end method

.method private getMajorDeviceClass_(Landroid/bluetooth/BluetoothDevice;)Ljava/lang/String;
    .locals 6
    .param p1, "device"    # Landroid/bluetooth/BluetoothDevice;

    .prologue
    const/4 v5, 0x0

    .line 74
    invoke-virtual {p1}, Landroid/bluetooth/BluetoothDevice;->getBluetoothClass()Landroid/bluetooth/BluetoothClass;

    move-result-object v3

    invoke-virtual {v3}, Landroid/bluetooth/BluetoothClass;->getMajorDeviceClass()I

    move-result v0

    .line 75
    .local v0, "c":I
    const-class v3, Landroid/bluetooth/BluetoothClass$Device$Major;

    invoke-virtual {v3}, Ljava/lang/Class;->getDeclaredFields()[Ljava/lang/reflect/Field;

    move-result-object v1

    .line 76
    .local v1, "fields":[Ljava/lang/reflect/Field;
    const/4 v2, 0x0

    .local v2, "i":I
    :goto_0
    array-length v3, v1

    if-lt v2, v3, :cond_0

    move-object v3, v5

    .line 82
    :goto_1
    return-object v3

    .line 78
    :cond_0
    :try_start_0
    aget-object v3, v1, v2

    const/4 v4, 0x0

    invoke-virtual {v3, v4}, Ljava/lang/reflect/Field;->getInt(Ljava/lang/Object;)I

    move-result v3

    if-ne v3, v0, :cond_1

    aget-object v3, v1, v2

    invoke-virtual {v3}, Ljava/lang/reflect/Field;->getName()Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v3

    goto :goto_1

    .line 79
    :catch_0
    move-exception v3

    .line 76
    :cond_1
    add-int/lit8 v2, v2, 0x1

    goto :goto_0
.end method

.method private getScanMode_(I)Ljava/lang/String;
    .locals 1
    .param p1, "iMode"    # I

    .prologue
    .line 138
    packed-switch p1, :pswitch_data_0

    .line 144
    :pswitch_0
    const-string v0, "none"

    :goto_0
    return-object v0

    .line 140
    :pswitch_1
    const-string v0, "connectable"

    goto :goto_0

    .line 142
    :pswitch_2
    const-string v0, "connectable_discoverable"

    goto :goto_0

    .line 138
    :pswitch_data_0
    .packed-switch 0x15
        :pswitch_1
        :pswitch_0
        :pswitch_2
    .end packed-switch
.end method

.method private getServiceClasses_(Landroid/bluetooth/BluetoothDevice;)Ljava/lang/String;
    .locals 8
    .param p1, "device"    # Landroid/bluetooth/BluetoothDevice;

    .prologue
    const-string v7, "\""

    .line 85
    invoke-virtual {p1}, Landroid/bluetooth/BluetoothDevice;->getBluetoothClass()Landroid/bluetooth/BluetoothClass;

    move-result-object v0

    .line 86
    .local v0, "c":Landroid/bluetooth/BluetoothClass;
    const-class v5, Landroid/bluetooth/BluetoothClass$Service;

    invoke-virtual {v5}, Ljava/lang/Class;->getDeclaredFields()[Ljava/lang/reflect/Field;

    move-result-object v1

    .line 87
    .local v1, "fields":[Ljava/lang/reflect/Field;
    new-instance v3, Ljava/util/ArrayList;

    invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V

    .line 88
    .local v3, "l":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Ljava/lang/String;>;"
    const/4 v2, 0x0

    .local v2, "i":I
    :goto_0
    array-length v5, v1

    if-lt v2, v5, :cond_0

    .line 94
    const-string v4, "["

    .line 95
    .local v4, "rtn":Ljava/lang/String;
    const/4 v2, 0x0

    .end local p0    # "this":Lrexsee/network/RexseeBluetooth;
    :goto_1
    invoke-virtual {v3}, Ljava/util/ArrayList;->size()I

    move-result v5

    if-lt v2, v5, :cond_2

    .line 99
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v6, "]"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 100
    return-object v4

    .line 90
    .end local v4    # "rtn":Ljava/lang/String;
    .restart local p0    # "this":Lrexsee/network/RexseeBluetooth;
    :cond_0
    :try_start_0
    aget-object v5, v1, v2

    const/4 v6, 0x0

    invoke-virtual {v5, v6}, Ljava/lang/reflect/Field;->getInt(Ljava/lang/Object;)I

    move-result v5

    invoke-virtual {v0, v5}, Landroid/bluetooth/BluetoothClass;->hasService(I)Z

    move-result v5

    if-eqz v5, :cond_1

    aget-object v5, v1, v2

    invoke-virtual {v5}, Ljava/lang/reflect/Field;->getName()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v3, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 88
    :cond_1
    :goto_2
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 96
    .end local p0    # "this":Lrexsee/network/RexseeBluetooth;
    .restart local v4    # "rtn":Ljava/lang/String;
    :cond_2
    if-eqz v2, :cond_3

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v6, ","

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 97
    :cond_3
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v6, "\""

    invoke-virtual {v5, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v3, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Ljava/lang/String;

    invoke-virtual {v5, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "\""

    invoke-virtual {v5, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 95
    add-int/lit8 v2, v2, 0x1

    goto :goto_1

    .line 91
    .end local v4    # "rtn":Ljava/lang/String;
    .restart local p0    # "this":Lrexsee/network/RexseeBluetooth;
    :catch_0
    move-exception v5

    goto :goto_2
.end method

.method private getState_(I)Ljava/lang/String;
    .locals 1
    .param p1, "iState"    # I

    .prologue
    .line 113
    packed-switch p1, :pswitch_data_0

    .line 123
    const-string v0, "unknown"

    :goto_0
    return-object v0

    .line 115
    :pswitch_0
    const-string v0, "on"

    goto :goto_0

    .line 117
    :pswitch_1
    const-string v0, "off"

    goto :goto_0

    .line 119
    :pswitch_2
    const-string v0, "turning_on"

    goto :goto_0

    .line 121
    :pswitch_3
    const-string v0, "turning_off"

    goto :goto_0

    .line 113
    :pswitch_data_0
    .packed-switch 0xa
        :pswitch_1
        :pswitch_2
        :pswitch_0
        :pswitch_3
    .end packed-switch
.end method

.method private declared-synchronized setConnectState_(I)V
    .locals 2
    .param p1, "state"    # I

    .prologue
    .line 160
    monitor-enter p0

    :try_start_0
    iget v0, p0, Lrexsee/network/RexseeBluetooth;->mConnectState:I

    iput v0, p0, Lrexsee/network/RexseeBluetooth;->mPreviousConnectState:I

    .line 161
    iput p1, p0, Lrexsee/network/RexseeBluetooth;->mConnectState:I

    .line 162
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onBluetoothDeviceConnectStateChanged"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->run(Ljava/lang/String;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 163
    monitor-exit p0

    return-void

    .line 160
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method private declared-synchronized writeBytes_([B)V
    .locals 2
    .param p1, "bytes"    # [B

    .prologue
    .line 165
    monitor-enter p0

    :try_start_0
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v0, :cond_1

    .line 166
    const-string v0, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 190
    :cond_0
    :goto_0
    monitor-exit p0

    return-void

    .line 169
    :cond_1
    :try_start_1
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->isEnabled()Z

    move-result v0

    if-nez v0, :cond_2

    .line 170
    const-string v0, "Bluetooth is disabled."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_0

    .line 165
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0

    .line 173
    :cond_2
    :try_start_2
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mCurrentRemoteDevice:Landroid/bluetooth/BluetoothDevice;

    if-nez v0, :cond_3

    .line 174
    const-string v0, "No connected device."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    goto :goto_0

    .line 177
    :cond_3
    iget v0, p0, Lrexsee/network/RexseeBluetooth;->mConnectState:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_0

    .line 178
    new-instance v0, Lrexsee/network/RexseeBluetooth$13;

    invoke-direct {v0, p0, p1}, Lrexsee/network/RexseeBluetooth$13;-><init>(Lrexsee/network/RexseeBluetooth;[B)V

    .line 189
    invoke-virtual {v0}, Lrexsee/network/RexseeBluetooth$13;->start()V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    goto :goto_0
.end method


# virtual methods
.method public accept()V
    .locals 2

    .prologue
    .line 812
    new-instance v0, Lrexsee/network/RexseeBluetooth$BluetoothConnection;

    const/4 v1, 0x0

    invoke-direct {v0, p0, v1}, Lrexsee/network/RexseeBluetooth$BluetoothConnection;-><init>(Lrexsee/network/RexseeBluetooth;Lrexsee/network/RexseeBluetooth$BluetoothConnection;)V

    invoke-virtual {v0}, Lrexsee/network/RexseeBluetooth$BluetoothConnection;->start()V

    .line 813
    return-void
.end method

.method public cancelDiscovery()Z
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 611
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v0, :cond_0

    .line 612
    const-string v0, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v0, v1

    .line 619
    :goto_0
    return v0

    .line 615
    :cond_0
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->isEnabled()Z

    move-result v0

    if-nez v0, :cond_1

    .line 616
    const-string v0, "Bluetooth is disabled."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v0, v1

    .line 617
    goto :goto_0

    .line 619
    :cond_1
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->cancelDiscovery()Z

    move-result v0

    goto :goto_0
.end method

.method public checkAddress(Ljava/lang/String;)Z
    .locals 1
    .param p1, "address"    # Ljava/lang/String;

    .prologue
    .line 486
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v0, :cond_0

    .line 487
    const-string v0, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 488
    const/4 v0, 0x0

    .line 490
    :goto_0
    return v0

    :cond_0
    invoke-static {p1}, Landroid/bluetooth/BluetoothAdapter;->checkBluetoothAddress(Ljava/lang/String;)Z

    move-result v0

    goto :goto_0
.end method

.method public declared-synchronized connect(Ljava/lang/String;)V
    .locals 3
    .param p1, "address"    # Ljava/lang/String;

    .prologue
    .line 819
    monitor-enter p0

    :try_start_0
    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v1, :cond_0

    .line 820
    const-string v1, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v1}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 854
    :goto_0
    monitor-exit p0

    return-void

    .line 823
    :cond_0
    :try_start_1
    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v1}, Landroid/bluetooth/BluetoothAdapter;->isEnabled()Z

    move-result v1

    if-nez v1, :cond_1

    .line 824
    const-string v1, "Bluetooth is disabled."

    invoke-direct {p0, v1}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_0

    .line 819
    :catchall_0
    move-exception v1

    monitor-exit p0

    throw v1

    .line 827
    :cond_1
    :try_start_2
    invoke-static {p1}, Landroid/bluetooth/BluetoothAdapter;->checkBluetoothAddress(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_2

    .line 828
    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "Bluetooth address is invalid:"

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {p0, v1}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    goto :goto_0

    .line 831
    :cond_2
    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v1, p1}, Landroid/bluetooth/BluetoothAdapter;->getRemoteDevice(Ljava/lang/String;)Landroid/bluetooth/BluetoothDevice;

    move-result-object v0

    .line 832
    .local v0, "device":Landroid/bluetooth/BluetoothDevice;
    if-nez v0, :cond_3

    .line 833
    const-string v1, "Remote device doesn\'t exist."

    invoke-direct {p0, v1}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    goto :goto_0

    .line 836
    :cond_3
    invoke-virtual {p0}, Lrexsee/network/RexseeBluetooth;->disconnect()V

    .line 837
    invoke-virtual {p0}, Lrexsee/network/RexseeBluetooth;->stopListenerForConnectRequest()Z

    .line 838
    const/4 v1, 0x1

    invoke-direct {p0, v1}, Lrexsee/network/RexseeBluetooth;->setConnectState_(I)V

    .line 839
    iput-object v0, p0, Lrexsee/network/RexseeBluetooth;->mCurrentRemoteDevice:Landroid/bluetooth/BluetoothDevice;

    .line 840
    new-instance v1, Lrexsee/network/RexseeBluetooth$16;

    invoke-direct {v1, p0}, Lrexsee/network/RexseeBluetooth$16;-><init>(Lrexsee/network/RexseeBluetooth;)V

    .line 853
    invoke-virtual {v1}, Lrexsee/network/RexseeBluetooth$16;->start()V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    goto :goto_0
.end method

.method public createBond(Ljava/lang/String;)Z
    .locals 7
    .param p1, "address"    # Ljava/lang/String;

    .prologue
    const/4 v6, 0x0

    .line 623
    iget-object v3, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v3, :cond_0

    .line 624
    const-string v3, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v3}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v3, v6

    .line 645
    :goto_0
    return v3

    .line 627
    :cond_0
    iget-object v3, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v3}, Landroid/bluetooth/BluetoothAdapter;->isEnabled()Z

    move-result v3

    if-nez v3, :cond_1

    .line 628
    const-string v3, "Bluetooth is disabled."

    invoke-direct {p0, v3}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v3, v6

    .line 629
    goto :goto_0

    .line 631
    :cond_1
    invoke-static {p1}, Landroid/bluetooth/BluetoothAdapter;->checkBluetoothAddress(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_2

    .line 632
    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "Bluetooth address is invalid:"

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-direct {p0, v3}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v3, v6

    .line 633
    goto :goto_0

    .line 635
    :cond_2
    iget-object v3, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v3, p1}, Landroid/bluetooth/BluetoothAdapter;->getRemoteDevice(Ljava/lang/String;)Landroid/bluetooth/BluetoothDevice;

    move-result-object v1

    .line 636
    .local v1, "device":Landroid/bluetooth/BluetoothDevice;
    if-nez v1, :cond_3

    .line 637
    const-string v3, "Remote device doesn\'t exist."

    invoke-direct {p0, v3}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v3, v6

    .line 638
    goto :goto_0

    .line 641
    :cond_3
    :try_start_0
    const-class v3, Landroid/bluetooth/BluetoothDevice;

    const-string v4, "createBond"

    const/4 v5, 0x0

    new-array v5, v5, [Ljava/lang/Class;

    invoke-virtual {v3, v4, v5}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;

    move-result-object v0

    .line 642
    .local v0, "createBondMethod":Ljava/lang/reflect/Method;
    const/4 v3, 0x0

    new-array v3, v3, [Ljava/lang/Object;

    invoke-virtual {v0, v1, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/Boolean;

    invoke-virtual {v3}, Ljava/lang/Boolean;->booleanValue()Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v3

    goto :goto_0

    .line 643
    .end local v0    # "createBondMethod":Ljava/lang/reflect/Method;
    :catch_0
    move-exception v3

    move-object v2, v3

    .line 644
    .local v2, "e":Ljava/lang/Exception;
    invoke-virtual {v2}, Ljava/lang/Exception;->getLocalizedMessage()Ljava/lang/String;

    move-result-object v3

    invoke-direct {p0, v3}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v3, v6

    .line 645
    goto :goto_0
.end method

.method public createBond(Ljava/lang/String;Ljava/lang/String;)Z
    .locals 9
    .param p1, "address"    # Ljava/lang/String;
    .param p2, "pin"    # Ljava/lang/String;

    .prologue
    const/4 v8, 0x0

    const-class v5, Landroid/bluetooth/BluetoothDevice;

    .line 649
    iget-object v5, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v5, :cond_0

    .line 650
    const-string v5, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v5}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v5, v8

    .line 690
    :goto_0
    return v5

    .line 653
    :cond_0
    iget-object v5, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v5}, Landroid/bluetooth/BluetoothAdapter;->isEnabled()Z

    move-result v5

    if-nez v5, :cond_1

    .line 654
    const-string v5, "Bluetooth is disabled."

    invoke-direct {p0, v5}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v5, v8

    .line 655
    goto :goto_0

    .line 657
    :cond_1
    invoke-static {p1}, Landroid/bluetooth/BluetoothAdapter;->checkBluetoothAddress(Ljava/lang/String;)Z

    move-result v5

    if-nez v5, :cond_2

    .line 658
    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "Bluetooth address is invalid:"

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v5, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-direct {p0, v5}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v5, v8

    .line 659
    goto :goto_0

    .line 661
    :cond_2
    iget-object v5, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v5, p1}, Landroid/bluetooth/BluetoothAdapter;->getRemoteDevice(Ljava/lang/String;)Landroid/bluetooth/BluetoothDevice;

    move-result-object v1

    .line 662
    .local v1, "device":Landroid/bluetooth/BluetoothDevice;
    if-nez v1, :cond_3

    .line 663
    const-string v5, "Remote device doesn\'t exist."

    invoke-direct {p0, v5}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v5, v8

    .line 664
    goto :goto_0

    .line 666
    :cond_3
    invoke-direct {p0, p2}, Lrexsee/network/RexseeBluetooth;->convertPinToBytes(Ljava/lang/String;)[B

    move-result-object v3

    .line 667
    .local v3, "pinBytes":[B
    if-nez v3, :cond_4

    .line 668
    const-string v5, "Invalid pin code."

    invoke-direct {p0, v5}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v5, v8

    .line 669
    goto :goto_0

    .line 672
    :cond_4
    :try_start_0
    const-class v5, Landroid/bluetooth/BluetoothDevice;

    const-string v6, "setPin"

    invoke-static {v5, v6}, Lrexsee/core/utilities/RexseeClazz;->getMethod(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/reflect/Method;

    move-result-object v4

    .line 673
    .local v4, "setPinMethod":Ljava/lang/reflect/Method;
    if-nez v4, :cond_5

    .line 674
    const-string v5, "setPin() method is not found."

    invoke-direct {p0, v5}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v5, v8

    .line 675
    goto :goto_0

    .line 677
    :cond_5
    const-class v5, Landroid/bluetooth/BluetoothDevice;

    const-string v6, "createBond"

    const/4 v7, 0x0

    new-array v7, v7, [Ljava/lang/Class;

    invoke-virtual {v5, v6, v7}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;

    move-result-object v0

    .line 678
    .local v0, "createBondMethod":Ljava/lang/reflect/Method;
    if-nez v0, :cond_6

    .line 679
    const-string v5, "createBond() method is not found."

    invoke-direct {p0, v5}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v5, v8

    .line 680
    goto :goto_0

    .line 684
    :cond_6
    const/4 v5, 0x1

    new-array v5, v5, [Ljava/lang/Object;

    const/4 v6, 0x0

    aput-object v3, v5, v6

    invoke-virtual {v4, v1, v5}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Ljava/lang/Boolean;

    invoke-virtual {v5}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v5

    if-nez v5, :cond_7

    .line 685
    const-string v5, "Set pin code failed."

    invoke-direct {p0, v5}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 687
    :cond_7
    const/4 v5, 0x0

    new-array v5, v5, [Ljava/lang/Object;

    invoke-virtual {v0, v1, v5}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Ljava/lang/Boolean;

    invoke-virtual {v5}, Ljava/lang/Boolean;->booleanValue()Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v5

    goto/16 :goto_0

    .line 688
    .end local v0    # "createBondMethod":Ljava/lang/reflect/Method;
    .end local v4    # "setPinMethod":Ljava/lang/reflect/Method;
    :catch_0
    move-exception v5

    move-object v2, v5

    .line 689
    .local v2, "e":Ljava/lang/Exception;
    invoke-virtual {v2}, Ljava/lang/Exception;->getLocalizedMessage()Ljava/lang/String;

    move-result-object v5

    invoke-direct {p0, v5}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v5, v8

    .line 690
    goto/16 :goto_0
.end method

.method public deny()V
    .locals 0

    .prologue
    .line 815
    invoke-virtual {p0}, Lrexsee/network/RexseeBluetooth;->startListenerForConnectRequest()Z

    .line 816
    return-void
.end method

.method public disable()Z
    .locals 1

    .prologue
    .line 567
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v0, :cond_0

    .line 568
    const-string v0, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 569
    const/4 v0, 0x0

    .line 571
    :goto_0
    return v0

    :cond_0
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->disable()Z

    move-result v0

    goto :goto_0
.end method

.method public declared-synchronized disconnect()V
    .locals 1

    .prologue
    .line 856
    monitor-enter p0

    :try_start_0
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v0, :cond_0

    .line 857
    const-string v0, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 873
    :goto_0
    monitor-exit p0

    return-void

    .line 860
    :cond_0
    :try_start_1
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->isEnabled()Z

    move-result v0

    if-nez v0, :cond_1

    .line 861
    const-string v0, "Bluetooth is disabled."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_0

    .line 856
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0

    .line 864
    :cond_1
    :try_start_2
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mSocket:Landroid/bluetooth/BluetoothSocket;
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    if-eqz v0, :cond_2

    .line 866
    :try_start_3
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mSocket:Landroid/bluetooth/BluetoothSocket;

    invoke-virtual {v0}, Landroid/bluetooth/BluetoothSocket;->close()V

    .line 867
    const/4 v0, 0x0

    iput-object v0, p0, Lrexsee/network/RexseeBluetooth;->mSocket:Landroid/bluetooth/BluetoothSocket;
    :try_end_3
    .catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_0
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    .line 871
    :cond_2
    :goto_1
    const/4 v0, 0x0

    :try_start_4
    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->setConnectState_(I)V

    .line 872
    const/4 v0, 0x0

    iput-object v0, p0, Lrexsee/network/RexseeBluetooth;->mCurrentRemoteDevice:Landroid/bluetooth/BluetoothDevice;
    :try_end_4
    .catchall {:try_start_4 .. :try_end_4} :catchall_0

    goto :goto_0

    .line 868
    :catch_0
    move-exception v0

    goto :goto_1
.end method

.method public enable()V
    .locals 3

    .prologue
    .line 543
    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v1, :cond_0

    .line 544
    const-string v1, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v1}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 558
    :goto_0
    return-void

    .line 547
    :cond_0
    new-instance v0, Landroid/content/Intent;

    const-string v1, "android.bluetooth.adapter.action.REQUEST_ENABLE"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 548
    .local v0, "intent":Landroid/content/Intent;
    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->activityResult:Lrexsee/core/browser/clazz/ActivityResult;

    new-instance v2, Lrexsee/network/RexseeBluetooth$14;

    invoke-direct {v2, p0}, Lrexsee/network/RexseeBluetooth$14;-><init>(Lrexsee/network/RexseeBluetooth;)V

    invoke-virtual {v1, v0, v2}, Lrexsee/core/browser/clazz/ActivityResult;->start(Landroid/content/Intent;Lrexsee/core/browser/clazz/ActivityResult$ActivityResultListener;)V

    goto :goto_0
.end method

.method public forceEnable()Z
    .locals 1

    .prologue
    .line 560
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v0, :cond_0

    .line 561
    const-string v0, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 562
    const/4 v0, 0x0

    .line 564
    :goto_0
    return v0

    :cond_0
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->enable()Z

    move-result v0

    goto :goto_0
.end method

.method public getAddress()Ljava/lang/String;
    .locals 1

    .prologue
    .line 436
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v0, :cond_0

    .line 437
    const-string v0, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 438
    const-string v0, ""

    .line 440
    :goto_0
    return-object v0

    :cond_0
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->getAddress()Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method

.method public getBondedDevices()Ljava/lang/String;
    .locals 5

    .prologue
    .line 527
    iget-object v3, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v3, :cond_0

    .line 528
    const-string v3, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v3}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 529
    const-string v3, "[]"

    .line 539
    :goto_0
    return-object v3

    .line 531
    :cond_0
    iget-object v3, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v3}, Landroid/bluetooth/BluetoothAdapter;->getBondedDevices()Ljava/util/Set;

    move-result-object v0

    .line 532
    .local v0, "devices":Ljava/util/Set;, "Ljava/util/Set<Landroid/bluetooth/BluetoothDevice;>;"
    invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v1

    .line 533
    .local v1, "iterator":Ljava/util/Iterator;, "Ljava/util/Iterator<Landroid/bluetooth/BluetoothDevice;>;"
    const-string v2, ""

    .line 534
    .local v2, "rtn":Ljava/lang/String;
    :goto_1
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-nez v3, :cond_1

    .line 538
    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "["

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "]"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    move-object v3, v2

    .line 539
    goto :goto_0

    .line 535
    :cond_1
    const-string v3, ""

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-nez v3, :cond_2

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, ","

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 536
    :cond_2
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v4, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Landroid/bluetooth/BluetoothDevice;

    invoke-direct {p0, v3}, Lrexsee/network/RexseeBluetooth;->getJsonInfoByDevice_(Landroid/bluetooth/BluetoothDevice;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v4, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    goto :goto_1
.end method

.method public getConnectState()Ljava/lang/String;
    .locals 2

    .prologue
    const-string v1, "none"

    .line 879
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v0, :cond_0

    .line 880
    const-string v0, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 881
    const-string v0, "none"

    move-object v0, v1

    .line 887
    :goto_0
    return-object v0

    .line 883
    :cond_0
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->isEnabled()Z

    move-result v0

    if-nez v0, :cond_1

    .line 884
    const-string v0, "Bluetooth is disabled."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 885
    const-string v0, "none"

    move-object v0, v1

    goto :goto_0

    .line 887
    :cond_1
    iget v0, p0, Lrexsee/network/RexseeBluetooth;->mConnectState:I

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->getConnectState_(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method

.method public getCurrentDevice()Ljava/lang/String;
    .locals 2

    .prologue
    const-string v1, "{}"

    .line 901
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v0, :cond_0

    .line 902
    const-string v0, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 903
    const-string v0, "{}"

    move-object v0, v1

    .line 913
    :goto_0
    return-object v0

    .line 905
    :cond_0
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->isEnabled()Z

    move-result v0

    if-nez v0, :cond_1

    .line 906
    const-string v0, "Bluetooth is disabled."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 907
    const-string v0, "{}"

    move-object v0, v1

    goto :goto_0

    .line 909
    :cond_1
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mCurrentRemoteDevice:Landroid/bluetooth/BluetoothDevice;

    if-nez v0, :cond_2

    .line 910
    const-string v0, "No current remote device."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 911
    const-string v0, "{}"

    move-object v0, v1

    goto :goto_0

    .line 913
    :cond_2
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mCurrentRemoteDevice:Landroid/bluetooth/BluetoothDevice;

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->getJsonInfoByDevice_(Landroid/bluetooth/BluetoothDevice;)Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method

.method public getCurrentDevices()Ljava/lang/String;
    .locals 4

    .prologue
    const-string v3, "[]"

    .line 509
    iget-object v2, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v2, :cond_0

    .line 510
    const-string v2, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v2}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 511
    const-string v2, "[]"

    move-object v2, v3

    .line 524
    :goto_0
    return-object v2

    .line 513
    :cond_0
    iget-object v2, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v2}, Landroid/bluetooth/BluetoothAdapter;->isEnabled()Z

    move-result v2

    if-nez v2, :cond_1

    .line 514
    const-string v2, "Bluetooth is disabled."

    invoke-direct {p0, v2}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 515
    const-string v2, "[]"

    move-object v2, v3

    goto :goto_0

    .line 517
    :cond_1
    iget-object v2, p0, Lrexsee/network/RexseeBluetooth;->mDeviceList:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v2

    if-nez v2, :cond_2

    const-string v2, "[]"

    move-object v2, v3

    goto :goto_0

    .line 518
    :cond_2
    const-string v1, "["

    .line 519
    .local v1, "rtn":Ljava/lang/String;
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_1
    iget-object v2, p0, Lrexsee/network/RexseeBluetooth;->mDeviceList:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v2

    if-lt v0, v2, :cond_3

    .line 523
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v3, "]"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    move-object v2, v1

    .line 524
    goto :goto_0

    .line 520
    :cond_3
    if-eqz v0, :cond_4

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v3, ","

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 521
    :cond_4
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v3, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v2, p0, Lrexsee/network/RexseeBluetooth;->mDeviceList:Ljava/util/ArrayList;

    invoke-virtual {v2, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/bluetooth/BluetoothDevice;

    invoke-direct {p0, v2}, Lrexsee/network/RexseeBluetooth;->getJsonInfoByDevice_(Landroid/bluetooth/BluetoothDevice;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 519
    add-int/lit8 v0, v0, 0x1

    goto :goto_1
.end method

.method public getDeviceInformation(Ljava/lang/String;)Ljava/lang/String;
    .locals 3
    .param p1, "address"    # Ljava/lang/String;

    .prologue
    const-string v2, "{}"

    .line 494
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v0, :cond_0

    .line 495
    const-string v0, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 496
    const-string v0, "{}"

    move-object v0, v2

    .line 506
    :goto_0
    return-object v0

    .line 498
    :cond_0
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->isEnabled()Z

    move-result v0

    if-nez v0, :cond_1

    .line 499
    const-string v0, "Bluetooth is disabled."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 500
    const-string v0, "{}"

    move-object v0, v2

    goto :goto_0

    .line 502
    :cond_1
    invoke-static {p1}, Landroid/bluetooth/BluetoothAdapter;->checkBluetoothAddress(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_2

    .line 503
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "Bluetooth address is invalid:"

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 504
    const-string v0, "{}"

    move-object v0, v2

    goto :goto_0

    .line 506
    :cond_2
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v0, p1}, Landroid/bluetooth/BluetoothAdapter;->getRemoteDevice(Ljava/lang/String;)Landroid/bluetooth/BluetoothDevice;

    move-result-object v0

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->getJsonInfoByDevice_(Landroid/bluetooth/BluetoothDevice;)Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method

.method public getInheritInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 0
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 38
    return-object p0
.end method

.method public getInterfaceName()Ljava/lang/String;
    .locals 2

    .prologue
    .line 34
    new-instance v0, Ljava/lang/StringBuilder;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v1, v1, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v1, v1, Lrexsee/core/application/Resource;->prefix:Ljava/lang/String;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "Bluetooth"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getName()Ljava/lang/String;
    .locals 1

    .prologue
    .line 443
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v0, :cond_0

    .line 444
    const-string v0, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 445
    const-string v0, ""

    .line 447
    :goto_0
    return-object v0

    :cond_0
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->getName()Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method

.method public getNewInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 42
    new-instance v0, Lrexsee/network/RexseeBluetooth;

    invoke-direct {v0, p1}, Lrexsee/network/RexseeBluetooth;-><init>(Lrexsee/core/browser/Browser;)V

    return-object v0
.end method

.method public getPreviousConnectState()Ljava/lang/String;
    .locals 2

    .prologue
    const-string v1, "none"

    .line 890
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v0, :cond_0

    .line 891
    const-string v0, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 892
    const-string v0, "none"

    move-object v0, v1

    .line 898
    :goto_0
    return-object v0

    .line 894
    :cond_0
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->isEnabled()Z

    move-result v0

    if-nez v0, :cond_1

    .line 895
    const-string v0, "Bluetooth is disabled."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 896
    const-string v0, "none"

    move-object v0, v1

    goto :goto_0

    .line 898
    :cond_1
    iget v0, p0, Lrexsee/network/RexseeBluetooth;->mPreviousConnectState:I

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->getConnectState_(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method

.method public getScanMode()Ljava/lang/String;
    .locals 1

    .prologue
    .line 464
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v0, :cond_0

    .line 465
    const-string v0, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 466
    const-string v0, ""

    .line 468
    :goto_0
    return-object v0

    :cond_0
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->getScanMode()I

    move-result v0

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->getScanMode_(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method

.method public getState()Ljava/lang/String;
    .locals 1

    .prologue
    .line 457
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v0, :cond_0

    .line 458
    const-string v0, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 459
    const-string v0, ""

    .line 461
    :goto_0
    return-object v0

    :cond_0
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->getState()I

    move-result v0

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->getState_(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method

.method public getSupportServiceClasses()Ljava/lang/String;
    .locals 6

    .prologue
    const-string v5, "\""

    .line 415
    iget-object v3, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v3, :cond_0

    .line 416
    const-string v3, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v3}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 417
    const-string v3, "[]"

    .line 426
    :goto_0
    return-object v3

    .line 419
    :cond_0
    const-class v3, Landroid/bluetooth/BluetoothClass$Service;

    invoke-virtual {v3}, Ljava/lang/Class;->getDeclaredFields()[Ljava/lang/reflect/Field;

    move-result-object v0

    .line 420
    .local v0, "fields":[Ljava/lang/reflect/Field;
    const-string v2, "["

    .line 421
    .local v2, "rtn":Ljava/lang/String;
    const/4 v1, 0x0

    .local v1, "i":I
    :goto_1
    array-length v3, v0

    if-lt v1, v3, :cond_1

    .line 425
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, "]"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    move-object v3, v2

    .line 426
    goto :goto_0

    .line 422
    :cond_1
    if-eqz v1, :cond_2

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, ","

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 423
    :cond_2
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, "\""

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    aget-object v4, v0, v1

    invoke-virtual {v4}, Ljava/lang/reflect/Field;->getName()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "\""

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 421
    add-int/lit8 v1, v1, 0x1

    goto :goto_1
.end method

.method public getSupportedDeviceClasses()Ljava/lang/String;
    .locals 6

    .prologue
    const-string v5, "\""

    .line 387
    iget-object v3, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v3, :cond_0

    .line 388
    const-string v3, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v3}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 389
    const-string v3, "[]"

    .line 398
    :goto_0
    return-object v3

    .line 391
    :cond_0
    const-class v3, Landroid/bluetooth/BluetoothClass$Device;

    invoke-virtual {v3}, Ljava/lang/Class;->getDeclaredFields()[Ljava/lang/reflect/Field;

    move-result-object v0

    .line 392
    .local v0, "fields":[Ljava/lang/reflect/Field;
    const-string v2, "["

    .line 393
    .local v2, "rtn":Ljava/lang/String;
    const/4 v1, 0x0

    .local v1, "i":I
    :goto_1
    array-length v3, v0

    if-lt v1, v3, :cond_1

    .line 397
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, "]"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    move-object v3, v2

    .line 398
    goto :goto_0

    .line 394
    :cond_1
    if-eqz v1, :cond_2

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, ","

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 395
    :cond_2
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, "\""

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    aget-object v4, v0, v1

    invoke-virtual {v4}, Ljava/lang/reflect/Field;->getName()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "\""

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 393
    add-int/lit8 v1, v1, 0x1

    goto :goto_1
.end method

.method public getSupportedDeviceMajorClasses()Ljava/lang/String;
    .locals 6

    .prologue
    const-string v5, "\""

    .line 401
    iget-object v3, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v3, :cond_0

    .line 402
    const-string v3, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v3}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 403
    const-string v3, "[]"

    .line 412
    :goto_0
    return-object v3

    .line 405
    :cond_0
    const-class v3, Landroid/bluetooth/BluetoothClass$Device$Major;

    invoke-virtual {v3}, Ljava/lang/Class;->getDeclaredFields()[Ljava/lang/reflect/Field;

    move-result-object v0

    .line 406
    .local v0, "fields":[Ljava/lang/reflect/Field;
    const-string v2, "["

    .line 407
    .local v2, "rtn":Ljava/lang/String;
    const/4 v1, 0x0

    .local v1, "i":I
    :goto_1
    array-length v3, v0

    if-lt v1, v3, :cond_1

    .line 411
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, "]"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    move-object v3, v2

    .line 412
    goto :goto_0

    .line 408
    :cond_1
    if-eqz v1, :cond_2

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, ","

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 409
    :cond_2
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, "\""

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    aget-object v4, v0, v1

    invoke-virtual {v4}, Ljava/lang/reflect/Field;->getName()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "\""

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 407
    add-int/lit8 v1, v1, 0x1

    goto :goto_1
.end method

.method public isConnected()Z
    .locals 2

    .prologue
    .line 876
    iget v0, p0, Lrexsee/network/RexseeBluetooth;->mConnectState:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public isDiscoverable()Z
    .locals 3

    .prologue
    const/4 v2, 0x0

    .line 471
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v0, :cond_0

    .line 472
    const-string v0, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v0, v2

    .line 475
    :goto_0
    return v0

    :cond_0
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->getScanMode()I

    move-result v0

    const/16 v1, 0x17

    if-ne v0, v1, :cond_1

    const/4 v0, 0x1

    goto :goto_0

    :cond_1
    move v0, v2

    goto :goto_0
.end method

.method public isDiscovering()Z
    .locals 1

    .prologue
    .line 478
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v0, :cond_0

    .line 479
    const-string v0, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 480
    const/4 v0, 0x0

    .line 482
    :goto_0
    return v0

    :cond_0
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->isDiscovering()Z

    move-result v0

    goto :goto_0
.end method

.method public isEnabled()Z
    .locals 1

    .prologue
    .line 433
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->isEnabled()Z

    move-result v0

    goto :goto_0
.end method

.method public isListeningToBroascast()Z
    .locals 1

    .prologue
    .line 721
    iget-boolean v0, p0, Lrexsee/network/RexseeBluetooth;->mIsListeningToBroadcast:Z

    return v0
.end method

.method public isListeningToConnectRequest()Z
    .locals 1

    .prologue
    .line 781
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mListenerForConnection:Lrexsee/network/RexseeBluetooth$ListenerForConnection;

    if-nez v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public isSupported()Z
    .locals 1

    .prologue
    .line 430
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public removeBond(Ljava/lang/String;)Z
    .locals 7
    .param p1, "address"    # Ljava/lang/String;

    .prologue
    const/4 v6, 0x0

    .line 694
    iget-object v3, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v3, :cond_0

    .line 695
    const-string v3, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v3}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v3, v6

    .line 716
    :goto_0
    return v3

    .line 698
    :cond_0
    iget-object v3, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v3}, Landroid/bluetooth/BluetoothAdapter;->isEnabled()Z

    move-result v3

    if-nez v3, :cond_1

    .line 699
    const-string v3, "Bluetooth is disabled."

    invoke-direct {p0, v3}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v3, v6

    .line 700
    goto :goto_0

    .line 702
    :cond_1
    invoke-static {p1}, Landroid/bluetooth/BluetoothAdapter;->checkBluetoothAddress(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_2

    .line 703
    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "Bluetooth address is invalid:"

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-direct {p0, v3}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v3, v6

    .line 704
    goto :goto_0

    .line 706
    :cond_2
    iget-object v3, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v3, p1}, Landroid/bluetooth/BluetoothAdapter;->getRemoteDevice(Ljava/lang/String;)Landroid/bluetooth/BluetoothDevice;

    move-result-object v0

    .line 707
    .local v0, "device":Landroid/bluetooth/BluetoothDevice;
    if-nez v0, :cond_3

    .line 708
    const-string v3, "Remote device doesn\'t exist."

    invoke-direct {p0, v3}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v3, v6

    .line 709
    goto :goto_0

    .line 712
    :cond_3
    :try_start_0
    const-class v3, Landroid/bluetooth/BluetoothDevice;

    const-string v4, "removeBond"

    const/4 v5, 0x0

    new-array v5, v5, [Ljava/lang/Class;

    invoke-virtual {v3, v4, v5}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;

    move-result-object v2

    .line 713
    .local v2, "removeBondMethod":Ljava/lang/reflect/Method;
    const/4 v3, 0x0

    new-array v3, v3, [Ljava/lang/Object;

    invoke-virtual {v2, v0, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/Boolean;

    invoke-virtual {v3}, Ljava/lang/Boolean;->booleanValue()Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v3

    goto :goto_0

    .line 714
    .end local v2    # "removeBondMethod":Ljava/lang/reflect/Method;
    :catch_0
    move-exception v3

    move-object v1, v3

    .line 715
    .local v1, "e":Ljava/lang/Exception;
    invoke-virtual {v1}, Ljava/lang/Exception;->getLocalizedMessage()Ljava/lang/String;

    move-result-object v3

    invoke-direct {p0, v3}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v3, v6

    .line 716
    goto :goto_0
.end method

.method public setDiscoverable(I)V
    .locals 3
    .param p1, "seconds"    # I

    .prologue
    .line 574
    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v1, :cond_0

    .line 575
    const-string v1, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v1}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 597
    :goto_0
    return-void

    .line 578
    :cond_0
    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v1}, Landroid/bluetooth/BluetoothAdapter;->isEnabled()Z

    move-result v1

    if-nez v1, :cond_1

    .line 579
    const-string v1, "Bluetooth is disabled."

    invoke-direct {p0, v1}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    goto :goto_0

    .line 582
    :cond_1
    const/16 v1, 0x12c

    if-le p1, v1, :cond_2

    .line 583
    const-string v1, "Too long dicoverable duration, it will be cut to 300 seconds."

    invoke-direct {p0, v1}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 585
    :cond_2
    new-instance v0, Landroid/content/Intent;

    const-string v1, "android.bluetooth.adapter.action.REQUEST_DISCOVERABLE"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 586
    .local v0, "intent":Landroid/content/Intent;
    const-string v1, "android.bluetooth.adapter.extra.DISCOVERABLE_DURATION"

    invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 587
    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->activityResult:Lrexsee/core/browser/clazz/ActivityResult;

    new-instance v2, Lrexsee/network/RexseeBluetooth$15;

    invoke-direct {v2, p0}, Lrexsee/network/RexseeBluetooth$15;-><init>(Lrexsee/network/RexseeBluetooth;)V

    invoke-virtual {v1, v0, v2}, Lrexsee/core/browser/clazz/ActivityResult;->start(Landroid/content/Intent;Lrexsee/core/browser/clazz/ActivityResult$ActivityResultListener;)V

    goto :goto_0
.end method

.method public setName(Ljava/lang/String;)Z
    .locals 1
    .param p1, "name"    # Ljava/lang/String;

    .prologue
    .line 450
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v0, :cond_0

    .line 451
    const-string v0, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 452
    const/4 v0, 0x0

    .line 454
    :goto_0
    return v0

    :cond_0
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v0, p1}, Landroid/bluetooth/BluetoothAdapter;->setName(Ljava/lang/String;)Z

    move-result v0

    goto :goto_0
.end method

.method public startDiscovery()Z
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 600
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v0, :cond_0

    .line 601
    const-string v0, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v0, v1

    .line 608
    :goto_0
    return v0

    .line 604
    :cond_0
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->isEnabled()Z

    move-result v0

    if-nez v0, :cond_1

    .line 605
    const-string v0, "Bluetooth is disabled."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v0, v1

    .line 606
    goto :goto_0

    .line 608
    :cond_1
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->startDiscovery()Z

    move-result v0

    goto :goto_0
.end method

.method public startListenerForBroadcast()Z
    .locals 5

    .prologue
    const/4 v4, 0x1

    .line 725
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v0, :cond_0

    .line 726
    const-string v0, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 727
    const/4 v0, 0x0

    .line 748
    :goto_0
    return v0

    .line 730
    :cond_0
    iget-boolean v0, p0, Lrexsee/network/RexseeBluetooth;->mIsListeningToBroadcast:Z

    if-eqz v0, :cond_1

    move v0, v4

    goto :goto_0

    .line 732
    :cond_1
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_DISCOVERY_STARTED_Receiver:Landroid/content/BroadcastReceiver;

    new-instance v2, Landroid/content/IntentFilter;

    const-string v3, "android.bluetooth.adapter.action.DISCOVERY_STARTED"

    invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v1, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 733
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_DISCOVERY_FINISHED_Receiver:Landroid/content/BroadcastReceiver;

    new-instance v2, Landroid/content/IntentFilter;

    const-string v3, "android.bluetooth.adapter.action.DISCOVERY_FINISHED"

    invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v1, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 734
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_LOCAL_NAME_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

    new-instance v2, Landroid/content/IntentFilter;

    const-string v3, "android.bluetooth.adapter.action.LOCAL_NAME_CHANGED"

    invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v1, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 735
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_SCAN_MODE_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

    new-instance v2, Landroid/content/IntentFilter;

    const-string v3, "android.bluetooth.adapter.action.SCAN_MODE_CHANGED"

    invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v1, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 736
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_STATE_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

    new-instance v2, Landroid/content/IntentFilter;

    const-string v3, "android.bluetooth.adapter.action.STATE_CHANGED"

    invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v1, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 738
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_FOUND_Receiver:Landroid/content/BroadcastReceiver;

    new-instance v2, Landroid/content/IntentFilter;

    const-string v3, "android.bluetooth.device.action.FOUND"

    invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v1, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 739
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_ACL_CONNECTED_Receiver:Landroid/content/BroadcastReceiver;

    new-instance v2, Landroid/content/IntentFilter;

    const-string v3, "android.bluetooth.device.action.ACL_CONNECTED"

    invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v1, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 740
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_ACL_DISCONNECTED_Receiver:Landroid/content/BroadcastReceiver;

    new-instance v2, Landroid/content/IntentFilter;

    const-string v3, "android.bluetooth.device.action.ACL_DISCONNECTED"

    invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v1, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 741
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_ACL_DISCONNECT_REQUESTED_Receiver:Landroid/content/BroadcastReceiver;

    new-instance v2, Landroid/content/IntentFilter;

    const-string v3, "android.bluetooth.device.action.ACL_DISCONNECT_REQUESTED"

    invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v1, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 742
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_BOND_STATE_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

    new-instance v2, Landroid/content/IntentFilter;

    const-string v3, "android.bluetooth.device.action.BOND_STATE_CHANGED"

    invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v1, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 743
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_CLASS_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

    new-instance v2, Landroid/content/IntentFilter;

    const-string v3, "android.bluetooth.device.action.CLASS_CHANGED"

    invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v1, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 744
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_NAME_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

    new-instance v2, Landroid/content/IntentFilter;

    const-string v3, "android.bluetooth.device.action.NAME_CHANGED"

    invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v1, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 746
    iput-boolean v4, p0, Lrexsee/network/RexseeBluetooth;->mIsListeningToBroadcast:Z

    move v0, v4

    .line 748
    goto/16 :goto_0
.end method

.method public startListenerForConnectRequest()Z
    .locals 4

    .prologue
    .line 784
    invoke-virtual {p0}, Lrexsee/network/RexseeBluetooth;->disconnect()V

    .line 785
    invoke-virtual {p0}, Lrexsee/network/RexseeBluetooth;->stopListenerForConnectRequest()Z

    .line 787
    :try_start_0
    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    const-string v2, "BluetoothIncomingConnection"

    sget-object v3, Lrexsee/network/RexseeBluetooth;->UUID_SERIAL_PORT:Ljava/util/UUID;

    invoke-virtual {v1, v2, v3}, Landroid/bluetooth/BluetoothAdapter;->listenUsingRfcommWithServiceRecord(Ljava/lang/String;Ljava/util/UUID;)Landroid/bluetooth/BluetoothServerSocket;

    move-result-object v1

    iput-object v1, p0, Lrexsee/network/RexseeBluetooth;->mServerSocket:Landroid/bluetooth/BluetoothServerSocket;

    .line 788
    new-instance v1, Lrexsee/network/RexseeBluetooth$ListenerForConnection;

    const/4 v2, 0x0

    invoke-direct {v1, p0, v2}, Lrexsee/network/RexseeBluetooth$ListenerForConnection;-><init>(Lrexsee/network/RexseeBluetooth;Lrexsee/network/RexseeBluetooth$ListenerForConnection;)V

    iput-object v1, p0, Lrexsee/network/RexseeBluetooth;->mListenerForConnection:Lrexsee/network/RexseeBluetooth$ListenerForConnection;

    .line 789
    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->mListenerForConnection:Lrexsee/network/RexseeBluetooth$ListenerForConnection;

    invoke-virtual {v1}, Lrexsee/network/RexseeBluetooth$ListenerForConnection;->start()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 790
    const/4 v1, 0x1

    .line 793
    :goto_0
    return v1

    .line 791
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 792
    .local v0, "e":Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->getLocalizedMessage()Ljava/lang/String;

    move-result-object v1

    invoke-direct {p0, v1}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 793
    const/4 v1, 0x0

    goto :goto_0
.end method

.method public stopListenerForBroadcast()Z
    .locals 4

    .prologue
    const/4 v3, 0x1

    const/4 v2, 0x0

    .line 753
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v0, :cond_0

    .line 754
    const-string v0, "Bluetooth isn\'t supported on this device."

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    move v0, v2

    .line 776
    :goto_0
    return v0

    .line 758
    :cond_0
    iget-boolean v0, p0, Lrexsee/network/RexseeBluetooth;->mIsListeningToBroadcast:Z

    if-nez v0, :cond_1

    move v0, v3

    goto :goto_0

    .line 760
    :cond_1
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_DISCOVERY_STARTED_Receiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v0, v1}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 761
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_DISCOVERY_FINISHED_Receiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v0, v1}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 762
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_LOCAL_NAME_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v0, v1}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 763
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_SCAN_MODE_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v0, v1}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 764
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_STATE_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v0, v1}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 766
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_FOUND_Receiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v0, v1}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 767
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_ACL_CONNECTED_Receiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v0, v1}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 768
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_ACL_DISCONNECTED_Receiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v0, v1}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 769
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_ACL_DISCONNECT_REQUESTED_Receiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v0, v1}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 770
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_BOND_STATE_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v0, v1}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 771
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_CLASS_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v0, v1}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 772
    iget-object v0, p0, Lrexsee/network/RexseeBluetooth;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->EVENT_ACTION_NAME_CHANGED_Receiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v0, v1}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 774
    iput-boolean v2, p0, Lrexsee/network/RexseeBluetooth;->mIsListeningToBroadcast:Z

    move v0, v3

    .line 776
    goto :goto_0
.end method

.method public stopListenerForConnectRequest()Z
    .locals 2

    .prologue
    .line 798
    :try_start_0
    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->mListenerForConnection:Lrexsee/network/RexseeBluetooth$ListenerForConnection;

    if-eqz v1, :cond_0

    .line 799
    const/4 v1, 0x0

    iput-object v1, p0, Lrexsee/network/RexseeBluetooth;->mListenerForConnection:Lrexsee/network/RexseeBluetooth$ListenerForConnection;

    .line 801
    :cond_0
    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->mServerSocket:Landroid/bluetooth/BluetoothServerSocket;

    if-eqz v1, :cond_1

    .line 802
    iget-object v1, p0, Lrexsee/network/RexseeBluetooth;->mServerSocket:Landroid/bluetooth/BluetoothServerSocket;

    invoke-virtual {v1}, Landroid/bluetooth/BluetoothServerSocket;->close()V

    .line 803
    const/4 v1, 0x0

    iput-object v1, p0, Lrexsee/network/RexseeBluetooth;->mServerSocket:Landroid/bluetooth/BluetoothServerSocket;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 805
    :cond_1
    const/4 v1, 0x1

    .line 808
    :goto_0
    return v1

    .line 806
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 807
    .local v0, "e":Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->getLocalizedMessage()Ljava/lang/String;

    move-result-object v1

    invoke-direct {p0, v1}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    .line 808
    const/4 v1, 0x0

    goto :goto_0
.end method

.method public write(Ljava/lang/String;Ljava/lang/String;)V
    .locals 1
    .param p1, "str"    # Ljava/lang/String;
    .param p2, "encoding"    # Ljava/lang/String;

    .prologue
    .line 930
    :try_start_0
    invoke-virtual {p1, p2}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B

    move-result-object v0

    invoke-direct {p0, v0}, Lrexsee/network/RexseeBluetooth;->writeBytes_([B)V
    :try_end_0
    .catch Ljava/io/UnsupportedEncodingException; {:try_start_0 .. :try_end_0} :catch_0

    .line 933
    :goto_0
    return-void

    .line 931
    :catch_0
    move-exception v0

    goto :goto_0
.end method

.method public writeASCII(Ljava/lang/String;)V
    .locals 5
    .param p1, "ascii"    # Ljava/lang/String;

    .prologue
    .line 918
    :try_start_0
    const-string v4, ","

    invoke-virtual {p1, v4}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v0

    .line 919
    .local v0, "as":[Ljava/lang/String;
    array-length v4, v0

    new-array v1, v4, [B

    .line 920
    .local v1, "bytes":[B
    const/4 v3, 0x0

    .local v3, "i":I
    :goto_0
    array-length v4, v0

    if-lt v3, v4, :cond_0

    .line 923
    invoke-direct {p0, v1}, Lrexsee/network/RexseeBluetooth;->writeBytes_([B)V

    .line 927
    .end local v0    # "as":[Ljava/lang/String;
    .end local v1    # "bytes":[B
    .end local v3    # "i":I
    :goto_1
    return-void

    .line 921
    .restart local v0    # "as":[Ljava/lang/String;
    .restart local v1    # "bytes":[B
    .restart local v3    # "i":I
    :cond_0
    aget-object v4, v0, v3

    invoke-static {v4}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v4

    int-to-byte v4, v4

    aput-byte v4, v1, v3
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 920
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 924
    .end local v0    # "as":[Ljava/lang/String;
    .end local v1    # "bytes":[B
    .end local v3    # "i":I
    :catch_0
    move-exception v4

    move-object v2, v4

    .line 925
    .local v2, "e":Ljava/lang/Exception;
    const-string v4, "Invalid ASCII code."

    invoke-direct {p0, v4}, Lrexsee/network/RexseeBluetooth;->error(Ljava/lang/String;)V

    goto :goto_1
.end method
